import { Component } from '@angular/core';
import { ROUTER_DIRECTIVES } from '@angular/router';

/**
 * This class represents the navigation bar component.
 */
@Component({
    moduleId: module.id,
    selector: 'sd-navbar',
    templateUrl: 'navbar.component.html',
    styleUrls: ['navbar.component.css'],
    directives: [ROUTER_DIRECTIVES]
})
export class NavbarComponent {
    nlogin:boolean;
    school:boolean;
    college:boolean;
    teacher:boolean;
    student:boolean;

    constructor() {
        this.logout();
    }

    public logout():void {
        this.nlogin = true;
        this.school = false;
        this.college = false;
        this.teacher = false;
        this.student = false;
    }

    public loginSchool():void {
        this.logout();
        this.nlogin = false;
        this.school = true;
    }

    public loginCollege():void {
        this.logout();
        this.nlogin = false;
        this.college = true;
    }

    public loginTeacher():void {
        this.logout();
        this.nlogin = false;
        this.teacher = true;
    }

    public loginStudent():void {
        this.logout();
        this.nlogin = false;
        this.student = true;
    }
}
